package msgActivity;

import com.sangdaelee.example.kakaoproject.R;

import android.content.Context;
import android.view.LayoutInflater;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

public class ItemReceive extends LinearLayout {
	
	TextView msgView;
	TextView msgDateView;
	TextView nameView;
	ImageView imageView;

	public ItemReceive(Context context) {
		super(context);
		LayoutInflater inflater = LayoutInflater.from(context);
		inflater.inflate(R.layout.list_item_receive, this);
		msgView = (TextView)findViewById(R.id.messagereceive);
		msgDateView = (TextView)findViewById(R.id.dateView1);
		nameView = (TextView)findViewById(R.id.nameView2);
		imageView = (ImageView)findViewById(R.id.imageView);
	}
	
	public void setData(Data data) {
		imageView.setImageBitmap(data.pic);
		nameView.setText(data.name);
		msgDateView.setText(data.date);
		msgView.setText(data.msg);
	}

}
